// 轮播图的相关逻辑
import { onMounted, ref } from 'vue'
import { getSlideData } from '@/api/home';
export function useBanner() {
  // 存放轮播图 数据
  const bannerList = ref([]);
  // 获取轮播图数据
  const getBanner = async () => {
    const res = await getSlideData({ distributionSite: '2' });
    bannerList.value = res.result;
  }
  onMounted(() => { getBanner() })
  return {
    bannerList
  }
}
